home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
STANDALO
/
FUMBLE_F
/
MISC.C
< prev
Wrap
Text File
|
1990-11-26
|
483b
|
31 lines
uppercase(x)
int x;
/*** return (int) uppercase version of x ***/
{
if (x>='a' && x<='z') return(x-32);
else return(x);
}
char * strcpy()
{
asm {
movea.l 4(sp),a0 ; A0 = s1
movea.l 8(sp),a1 ; A1 = s2
move.l a0,d0 ; D0.L = result
@1 move.b (a1)+,(a0)+
bne.s @1
}
}
int strlen(/* char *s */)
{
asm {
moveq #-1,d0 ; D0.L = result
movea.l 4(sp),a0 ; A0 = s
@1 addq.l #1,d0
tst.b (a0)+
bne.s @1
}
}